package pl.edu.agh.mguesser;

import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import pl.edu.agh.mguesser.exception.MusicGuesserRuntimeException;

/**
 * @author keiran
 */
public class Main {
            
    public void start() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            
        } catch (ClassNotFoundException | InstantiationException 
                | IllegalAccessException | UnsupportedLookAndFeelException ex) {
            throw new MusicGuesserRuntimeException(ex);
            
        }
        
        ClassPathXmlApplicationContext context
                = new ClassPathXmlApplicationContext(new String[]{ "conf/app-context.xml" }, false);
        context.refresh();
    }

    public static void main(String[] args) {
        Main main = new Main();
        main.start();
    }
    
}
